<?

/* start data FOR DROPDOWN MENUS*/
$child_birth_position = array('none'=>'none','first'=>'First','second'=>'Second','third'=>'third','fourth'=>'Fourth','fifth'=>'Fifth','sixth'=>'Sixth','youngest'=>'Youngest','only'=>'Only');
/* end dataFOR DROPDOWN MENUS*/




$parent_status = set_value('parent_status',$student->parent_status);
$status_how_long = set_value('status_how_long',$student->parent_status_how_long);
$right_over_child = set_value('right_over_child',$student->parent_rights);
$position_of_child = set_value('position_of_child',$student->child_pos);
$is_child_adopted = set_value('is_child_adopted',$student->child_adopted);
$age_of_adoption = set_value('age_of_adoption',$student->child_age_adopted);
$child_aware_adopted = set_value('age_of_adoption',$student->child_aware_adopted);
$mother_presently_pregnant = set_value('mother_presently_pregnant',$student->mother_present_pregnant);
$mother_pregnancy_due_date = set_value('mother_pregnancy_due_date',$student->mother_due_date);

$family_deaths = set_value('family_deaths',$student->family_deaths);
$family_deaths_relation = set_value('family_accidents',$student->family_deaths_child_relation);
$family_accidents = set_value('family_accidents',$student->family_accidents);
$family_accidents_relation = set_value('family_accidents_relation',$student->family_accidents_child_relation);
$what = set_value('what',$student->what);
$when = set_value('when',$student->when);


$siblingage1 = set_value('siblingage1',$student->sibling_age1);
$siblingage2 = set_value('siblingage2',$student->sibling_age2);
$siblingage3 = set_value('siblingage3',$student->sibling_age3);
$siblingage4 = set_value('siblingage4',$student->sibling_age4);
$siblingage5 = set_value('siblingage5',$student->sibling_age5);
$siblingage6 = set_value('siblingage6',$student->sibling_age6);


$siblingfname1 = set_value('siblingfname1',$student->sibling_fname1);
$siblingfname2 = set_value('siblingfname2',$student->sibling_fname2);
$siblingfname3 = set_value('siblingfname3',$student->sibling_fname3);
$siblingfname4 = set_value('siblingfname4',$student->sibling_fname4);
$siblingfname5 = set_value('siblingfname5',$student->sibling_fname5);
$siblingfname6 = set_value('siblingfname6',$student->sibling_fname6);

$siblinglname1 = set_value('siblingname1',$student->sibling_lname1);
$siblinglname2 = set_value('siblingname2',$student->sibling_lname2);
$siblinglname3 = set_value('siblingname3',$student->sibling_lname3);
$siblinglname4 = set_value('siblingname4',$student->sibling_lname4);
$siblinglname5 = set_value('siblingname5',$student->sibling_lname5);
$siblinglname6 = set_value('siblingname6',$student->sibling_lname6);


$hhmembers1 = set_value('hhmembers1',$student->other_household_member1);
$hhmembers2 = set_value('hhmembers2',$student->other_household_member2);
$hhmembers3 = set_value('hhmembers3',$student->other_household_member3);
$hhmembers4 = set_value('hhmembers4',$student->other_household_member4);
$hhmembers5 = set_value('hhmembers5',$student->other_household_member5);
$hhmembers6 = set_value('hhmembers6',$student->other_household_member6);

$hhmembersage1 = set_value('hhmembersage1',$student->other_household_age1);
$hhmembersage2 = set_value('hhmembersage2',$student->other_household_age2);
$hhmembersage3 = set_value('hhmembersage3',$student->other_household_age3);
$hhmembersage4 = set_value('hhmembersage4',$student->other_household_age4);
$hhmembersage5 = set_value('hhmembersage5',$student->other_household_age5);
$hhmembersage6 = set_value('hhmembersage6',$student->other_household_age6);


$language_at_home = set_value('language_at_home',$student->languages_spoken_at_home);
$family_activities = set_value('family_activities',$student->family_activities);
$family_activities_frequent = set_value('family_activities_frequent',$student->family_activities_frequent);
$tv_time = set_value('tv_time',$student->time_spent_on_tv);
$tv_whom = set_value('tv_whom',$student->tv_whom);
$radio_time = set_value('radio_time',$student->time_spent_on_radio);
$radio_whom = set_value('radio_whom',$student->radio_whom);
$computergames_time = set_value('computergames_time',$student->time_spent_on_pc);
$computergames_whom = set_value('computergames_whom',$student->pc_whom);
$child_responsibilities_what = set_value('child_responsibilities_what',$student->responsibility_what);
$child_play_group = set_value('child_play_group',$student->child_playgroup);
$child_play_group_frequent = set_value('child_play_group_frequent',$student->child_playgroup_frequent);
$other_interest = set_value('other_interest',$student->child_interest);
?>
<div>
<div class="alert-box secondary"><h6>Family History</h6></div>
	<form action="<?=site_url('guardian/student_profiles/'.$hid);?>" method="POST" id="update_student_data">
	<div class="large-6 columns">
		<label class="radius secondary label">Status of Parents</label>
		<?=form_error('parent_status');?>
		<? echo form_dropdown('parent_status',array('married'=>'married',
									   'remarried'=>'remarried',
									   'living together'=>'living together',
									   'separated'=>'separated',
									   'Single Parent'=>'Single Parent'),$parent_status); ?>
	</div>
	<div  class="large-6 columns">
		<label class="radius secondary label">For How Long</label>
		<?=form_error('status_how_long');?>
		<input type="text" name="status_how_long" value="<?=$status_how_long;?>">
	</div>
	<!--
	<div>
		<label class="radius secondary label">(if single parent) Only</label>
		<?//=form_error('right_over_child');?>
		<input type="text" name="right_over_child" value="<?=$right_over_child;?>">
	</div>
	-->
	<div>
		<label class="radius secondary label">(separated or single) Do parents have rights over child?</label>
		<?=form_error('right_over_child');?>
		<input type="text" name="right_over_child" value="<?=$right_over_child;?>">
	</div>
	
		<div>
			<legend>Other Family Members (SIBLINGS ONLY)</legend>
			<div class="row">
				<div class="large-10 columns">
					<div class="large-6 columns">
						<label class="radius secondary label">First Name</label>
						<?=form_error('siblingfname1');?>
						<input type="text" name="siblingfname1" value="<?=$siblingfname1;?>">
					</div>
					<div class="large-6 columns">
						<label class="radius secondary label">Last Name</label>
						<?=form_error('siblinglname1');?>
						<input type="text" name="siblinglname1" value="<?=$siblinglname1;?>">
					</div>
				</div>
				<div class="large-2 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('siblingage1');?>
					<input type="text" name="siblingage1" value="<?=$siblingage1;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-10 columns">
					<div class="large-6 columns">
						<label class="radius secondary label">First Name</label>
						<?=form_error('siblingfname2');?>
						<input type="text" name="siblingfname2" value="<?=$siblingfname2;?>">
					</div>
					<div class="large-6 columns">
						<label class="radius secondary label">Last Name</label>
						<?=form_error('siblinglname2');?>
						<input type="text" name="siblinglname2" value="<?=$siblinglname2;?>">
					</div>
				</div>
				<div class="large-2 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('siblingage2');?>
					<input type="text" name="siblingage2" value="<?=$siblingage2;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-10 columns">
					<div class="large-6 columns">
						<label class="radius secondary label">First Name</label>
						<?=form_error('siblingfname3');?>
						<input type="text" name="siblingfname3" value="<?=$siblingfname3;?>">
					</div>
					<div class="large-6 columns">
						<label class="radius secondary label">Last Name</label>
						<?=form_error('siblinglname3');?>
						<input type="text" name="siblinglname3" value="<?=$siblinglname3;?>">
					</div>
				</div>
				<div class="large-2 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('siblingage3');?>
					<input type="text" name="siblingage3" value="<?=$siblingage3;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-10 columns">
					<div class="large-6 columns">
						<label class="radius secondary label">First Name</label>
						<?=form_error('siblingfname4');?>
						<input type="text" name="siblingfname4" value="<?=$siblingfname4;?>">
					</div>
					<div class="large-6 columns">
						<label class="radius secondary label">Last Name</label>
						<?=form_error('siblinglname4');?>
						<input type="text" name="siblinglname4" value="<?=$siblinglname4;?>">
					</div>
				</div>
				<div class="large-2 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('siblingage4');?>
					<input type="text" name="siblingage4" value="<?=$siblingage4;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-10 columns">
					<div class="large-6 columns">
						<label class="radius secondary label">First Name</label>
						<?=form_error('siblingfname5');?>
						<input type="text" name="siblingfname5" value="<?=$siblingfname5;?>">
					</div>
					<div class="large-6 columns">
						<label class="radius secondary label">Last Name</label>
						<?=form_error('siblinglname5');?>
						<input type="text" name="siblinglname5" value="<?=$siblinglname5;?>">
					</div>
				</div>
				<div class="large-2 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('siblingage5');?>
					<input type="text" name="siblingage5" value="<?=$siblingage5;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-10 columns">
					<div class="large-6 columns">
						<label class="radius secondary label">First Name</label>
						<?=form_error('siblingfname6');?>
						<input type="text" name="siblingfname6" value="<?=$siblingfname6;?>">
					</div>
					<div class="large-6 columns">
						<label class="radius secondary label">Last Name</label>
						<?=form_error('siblinglname6');?>
						<input type="text" name="siblinglname6" value="<?=$siblinglname6;?>">
					</div>
				</div>
				<div class="large-2 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('siblingage6');?>
					<input type="text" name="siblingage6" value="<?=$siblingage6;?>">
				</div>
			</div>
		</div>

	<div>
		<label class="radius secondary label">Position of Child in Family</label>
		<?=form_error('position_of_child');?>
		<?=form_dropdown('position_of_child',$child_birth_position,$position_of_child);?>
	</div>
	
	<div>
		<div class="large-5 columns">
			<label class="radius secondary label">Is Child Adopted</label>
			<?=form_error('is_child_adopted');?>
			<?=form_dropdown('is_child_adopted',array('no'=>'No','yes'=>'Yes'),$is_child_adopted);?>
		</div>
		<div class="large-5 columns">
			<label class="radius secondary label">If Yes Age of Adoption</label>
			<?=form_error('age_of_adoption');?>
			<input type="text" name="age_of_adoption" value="<?=$age_of_adoption;?>">
		</div>
		<div class="clearfix"></div>
		<div class="large-4 columns">
			<label class="radius secondary label">Is the child aware he/she is adopted?</label>
			<?=form_error('child_aware_adopted');?>
			<?=form_dropdown('child_aware_adopted',array('no'=>'No','yes'=>'Yes'),$child_aware_adopted);?>
		</div>
	</div>
	
	<div>
		<div class="large-8 columns">
			<label class="radius secondary label">Is the mother presently pregnant?</label>
			<?=form_error('mother_presently_pregnant');?>
			<?=form_dropdown('mother_presently_pregnant',array('no'=>'No','yes'=>'Yes'),$mother_presently_pregnant);?>
		</div>
		<div class="large-3 columns">
			<label class="radius secondary label">If Yes Due date</label>
			<?=form_error('mother_pregnancy_due_date');?>
			<input type="text" name="mother_pregnancy_due_date" value="<?=$mother_pregnancy_due_date;?>">
		</div>
	</div>
	
	<div>
		<div class="large-7 columns">
			<label class="radius secondary label">Has there been any deaths in the immediate family?</label>
			<?=form_error('family_deaths');?>
			<?=form_dropdown('family_deaths',array('no'=>'No','yes'=>'Yes'),$family_deaths);?>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Relation to child</label>
			<?=form_error('family_deaths_relation');?>
			<input type="text" name="family_deaths_relation" value="<?=$family_deaths_relation;?>">
		</div>
		
		
		
		<div class="large-7 columns">
			<label class="radius secondary label">Has there been any serious accidents in the family?</label>
			<?=form_error('family_accidents');?>
			<?=form_dropdown('family_accidents',array('no'=>'No','yes'=>'Yes'),$family_accidents);?>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Relation to child</label>
			<?=form_error('family_accidents_relation');?>
			<input type="text" name="family_accidents_relation" value="<?=$family_accidents_relation;?>">
		</div>
		
		<div>
			<label class="radius secondary label">What?:</label>
			<?=form_error('what');?>
			<input type="text" name="what" value="<?=$what;?>">
		</div>
		<div>
			<label class="radius secondary label">When?:</label>
			<?=form_error('when');?>
			<input type="text" name="when" value="<?=$when;?>">
		</div>
	</div>
	
	<div>
			<legend>Other Household Members (Relatives,Helpers, etc..)</legend>
			<div class="row">
				<div class="large-8 columns">
					<label class="radius secondary label">Name</label>
					<?=form_error('hhmembers1');?>
					<input type="text" name="hhmembers1" value="<?=$hhmembers1;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('hhmembersage1');?>
					<input type="text" name="hhmembersage1" value="<?=$hhmembersage1;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-8 columns">
					<label class="radius secondary label">Name</label>
					<?=form_error('hhmembers2');?>
					<input type="text" name="hhmembers2" value="<?=$hhmembers2;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('hhmembersage2');?>
					<input type="text" name="hhmembersage2" value="<?=$hhmembersage2;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-8 columns">
					<label class="radius secondary label">Name</label>
					<?=form_error('hhmembers3');?>
					<input type="text" name="hhmembers3" value="<?=$hhmembers3;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('hhmembersage3');?>
					<input type="text" name="hhmembersage3" value="<?=$hhmembersage3;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-8 columns">
					<label class="radius secondary label">Name</label>
					<?=form_error('hhmembers4');?>
					<input type="text" name="hhmembers4" value="<?=$hhmembers4;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('hhmembersage4');?>
					<input type="text" name="hhmembersage4" value="<?=$hhmembersage4;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-8 columns">
					<label class="radius secondary label">Name</label>
					<?=form_error('hhmembers5');?>
					<input type="text" name="hhmembers5" value="<?=$hhmembers5;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('hhmembersage5');?>
					<input type="text" name="hhmembersage5" value="<?=$hhmembersage5;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-8 columns">
					<label class="radius secondary label">Name</label>
					<?=form_error('hhmembers6');?>
					<input type="text" name="hhmembers6" value="<?=$hhmembers6;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Age</label>
					<?=form_error('hhmembersage6');?>
					<input type="text" name="hhmembersage6" value="<?=$hhmembersage6;?>">
				</div>
			</div>
		</div>
		
		<div>
			<label class="radius secondary label">Languages Spoken at home?</label>
			<?=form_error('language_at_home');?>
			<input type="text" name="language_at_home" value="<?=$language_at_home;?>">
		</div>
		
		<div class="row">
			<div class="large-6 columns">
				<label class="radius secondary label">Activites Family Engages in?</label>
				<?=form_error('family_activities');?>
				<textarea name="family_activities"><?=$family_activities;?></textarea>
			</div>
			<div class="large-6 columns">
				<label class="radius secondary label">How frequent?</label>
				<?=form_error('family_activities_frequent');?>
				<textarea name="family_activities_frequent"><?=$family_activities_frequent;?></textarea>
			</div>
		</div>
		
		<div>
			<legend>How much time does the child spend in</legend>
			<div class="row">
				<div class="large-6 columns">
					<label class="radius secondary label">Watching TV or videos in a day?</label>
					<?=form_error('tv_time');?>
					<input type="text" name="tv_time" value="<?=$tv_time;?>">
				</div>
				<div class="large-6 columns">
					<label class="radius secondary label">With Whom</label>
					<?=form_error('tv_whom');?>
					<input type="text" name="tv_whom" value="<?=$tv_whom;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-6 columns">
					<label class="radius secondary label">Listening to radio in a day?</label>
					<?=form_error('radio_time');?>
					<input type="text" name="radio_time" value="<?=$radio_time;?>">
				</div>
				<div class="large-6 columns">
					<label class="radius secondary label">With Whom</label>
					<?=form_error('radio_whom');?>
					<input type="text" name="radio_whom" value="<?=$radio_whom;?>">
				</div>
			</div>
			<div class="row">
				<div class="large-6 columns">
					<label class="radius secondary label">Playing computer games in a day?</label>
					<?=form_error('computergames_time');?>
					<input type="text" name="computergames_time" value="<?=$computergames_time;?>">
				</div>
				<div class="large-6 columns">
					<label class="radius secondary label">With Whom</label>
					<?=form_error('computergames_whom');?>
					<input type="text" name="computergames_whom" value="<?=$computergames_whom;?>">
				</div>
			</div>
		</div>
		
		<div>
		<div>
			<label class="radius secondary label">Does the child have any Responsibilities/Duties in Home? What are his/her responsibilities?</label>
			<?=form_error('child_responsibilities_what');?>
			<input type="text" name="child_responsibilities_what" value="<?=$child_responsibilities_what;?>">
		</div>
		<div class="clearfix"></div>
		<div  class="row">
			<div class="large-6 columns">
				<label class="radius secondary label">Does child have a play group?</label>
				<?=form_error('child_play_group');?>
				<input type="text" name="child_play_group" value="<?=$child_play_group;?>">
			</div>
			<div class="large-6 columns">
					<label class="radius secondary label">How frequent does child play with group</label>
					<?=form_error('child_play_group_frequent');?>
					<input type="text" name="child_play_group_frequent" value="<?=$child_play_group_frequent;?>">
			</div>
		</div>
		<div class="clearfix"></div>
		<div>
			<label class="radius secondary label">What are the other activites/interest of your child?</label>
			<?=form_error('other_interest');?>
			<textarea name="other_interest"><?=$other_interest;?></textarea>
		</div>
		<?if(@$student->edit == 0 OR isset($imastudent)):?>
		<span><small style="color:#f00">Sorry but this profile is locked and cannot be edited, please contact the school registrar.</small></span></br>
	<?else:?>
		<hr>
		<div>
			<input type="hidden" name="profile_id" value="<?=$student->profile_id;?>">
			<input type="hidden" name="enrollment_id" value="<?=$student->enrollment_id;?>">
			<input type="hidden" name="update_family_history" value="true">
			<input type="submit" name="update_family_history" value="Update Family History"  class="btn btn-primary">
		</div>
		<?endif;?>
		</form>
</div>